{% extends "base.html" %}
{% import "bootstrap/wtf.html" as wtf %}
{% import "_macros.html" as macros %}

{% block title %}语音识别模型基准测试系统{% endblock %}

{% block page_content %}
<div class="page-header">
    <p>目前共有{{ comp_results.total }}条数据集数据项</p>
    <a class="btn btn-default" href="{{ url_for('.comp_result_add') }}">添加模型指标数值比对结果</a>
    {% if comp_results.first==0 %}
    <p>没有模型指标数值比对结果信息</p>
    {% else %}
    <div class="row">
    <table class="table">
        <thead>
        <tr>
            <th>名称</th>
            <th>比对的指标</th>
            <th>备注</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {% for i in comp_results.items|length %}
        <tr>
            <td>{{ comp_results.items[i].name }}</td>
            <td>{{ comp_results.items[i].metrics }}</td>
            <td>{{ comp_results.items[i].note }}</td>
            <td>
                <a class="btn btn-default" href="{{ url_for('.comp_result_edit',id=comp_results.items[i].id) }}">修改</a>
                <a class="btn btn-default" href="{{ url_for('.comp_result_delete',id=comp_results.items[i].id) }}">删除</a>
                <a class="btn btn-default" href="{{ url_for('.comp_result_active',id=comp_results.items[i].id) }}">更新活动时间</a>
                <a class="btn btn-default" href="{{ url_for('.comp_result_copy',id=comp_results.items[i].id) }}">以此为模版新建</a>
            </td>
        </tr>
        {% endfor %}
        </tbody>
        <tfoot>
            <tr>
                <td colspan="2">
                    <ul class="pagination">
                        {% for i in page_range %}
                        {% if i==comp_results.page %}
                        <li class="active"><a href="/bt_result?page={{ i }}&per_page={{ per_page }}">{{ i }}</a></li>
                        {% else %}
                        <li><a href="/bt_result?page={{ i }}&per_page={{ per_page }}">{{ i }}</a></li>
                        {% endif %}
                        {% endfor %}
                    </ul>
                </td>
                <td colspan="2" style="vertical-align:bottom">
                    <li class="dropdown">
                        <a href="#" class="dropdown-toggle" data-toggle="dropdown">当前每页{{ per_page }}条数据项，更改至每页数据项 <b class="caret"></b></a>
                        <ul class="dropdown-menu">
                            {% for i in [5,10,20,50] %}
                            <li><a href="/bt_result?page=1&per_page={{ i }}">{{ i }}条</a></li>
                            {% endfor %}
                        </ul>
                    </li>
                </td>
            </tr>
        </tfoot>
    </table>
</div>
    {% endif %}
</div>

{% endblock %}